package com.neusoft.tijian.controller;

import com.neusoft.tijian.po.Hospital;
import com.neusoft.tijian.service.HospitalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/hosptial")
public class HosptialController {
    @Autowired
    private HospitalService hospitalService;
    @RequestMapping("/listHospital")
    public List<Hospital> listHospital(Hospital hospital){
        return hospitalService.listHospital(hospital);
    }
    @RequestMapping("/getHospitalById")
    public Hospital getHospitalById(Hospital hospital){
        return hospitalService.getHospitalById(hospital);
    }
}
